$(function(){
	$("#login").click(function(){
		var accountNo = $("#accountNo").val();
		var password = $("#password").val();
		if(!accountNo){
			alert("请输入账户名")
			return;
		}
		if(!password){
			alert("请输入密码")
			return;
		}
		$.ajax({
			url:"/yang/account/login",
			type:"POST",
			dataType:"json",
			data:{
				"accountNo":accountNo,
				"password":hex_md5(password).toUpperCase()
			},
			success:function(data){
				if(data.code == 1){
					window.location.href="/yang/index";
				}else{
					alert(data.msg);
				}
			},
			error:function(e){
				alert(e);
			}
		});
	});
});